import config from "@/config"
import http from "@/utils/request"

export default {
	list: {
		url: `${config.API_URL}/system/menu/list`,
		name: "获取系统菜单",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	userList: {
		url: `${config.API_URL}/system/menu/userList`,
		name: "获取用户菜单",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	tree: {
		url: `${config.API_URL}/system/menu/tree`,
		name: "获取菜单树",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
	save: {
		url: `${config.API_URL}/system/menu/save`,
		name: "保存菜单",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	auth: {
		url: `${config.API_URL}/system/menu/auth`,
		name: "授权菜单",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	deletes: {
		url: `${config.API_URL}/system/menu/deletes`,
		name: "批量删除菜单",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	}
}
